<?php
class Test
{
    protected function __construct()
    {
        echo "Test::__construct";
    }
    private function test()
    {
        echo "Test::test";
    }
    static public function alloc()
    {
        $instance = new static;
        $instance->test();
        return $instance;
    }
}
$test = Test::alloc();
// $test = new Test;
